<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:a4j="http://richfaces.org/a4j">

<f:view contentType="text/html">
    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
        <meta http-equiv="pragma" content="no-cache"/>
        <meta http-equiv="Cache-Control" content="no-cache, must-revalidate"/>
        <meta http-equiv="expires" content="0"/>
        <meta http-equiv="X-UA-Compatible" content="IE=7"/>
        <title>YAM电子政务平台</title>
        <!--由于CSS选择器级别问题，当自己设置一些与rf相同名称的表格相关的样式时，会选择最后出现的一个，所以在这里手工加入-->
        <h:outputStylesheet library="org.richfaces" name="datatable.ecss"/>
        <h:outputStylesheet library="css" name="layout.css"/>
        <h:outputStylesheet library="css" name="common.css"/>
        <h:outputScript target="head" name="jquery.js"/>
        <h:outputScript target="head" name="js/pawn.js"/>
    </h:head>
    <h:body>

        <div id="header">
            <ui:include src="/WEB-INF/common/header.xhtml"/>
        </div>
        <div id="wrapper">
            <div id="content">
                <rich:panel id="MainPanel">
                    <f:facet name="header">
                        <ui:insert name="location"/>
                    </f:facet>
                    <ui:insert name="context"/>
                </rich:panel>
            </div>
        </div>
        <div id="left">
            <ui:include src="/WEB-INF/common/menu.xhtml"/>
        </div>
        <div id="footer">
            <ui:include src="/WEB-INF/common/footer.xhtml"/>
        </div>

        <rich:popupPanel id="ChangePwd" top="30" moveable="false" autosized="true">
            <f:facet name="header">
                修改密码
            </f:facet>
            <f:facet name="controls">
                <h:graphicImage value="#{resource['images/close.png']}" styleClass="hand"
                                onclick="#{rich:component('ChangePwd')}.hide();return false;"/>
            </f:facet>
            <h:form id="ChangePwdFrom">
                <h:panelGrid id="ChangePwdGrid" columns="3" border="0">
                    <h:outputLabel id="NameLabel" value="用户名称:" for="NameText"/>
                    <h:outputText id="NameText" value="#{accountSession.account.userName}"/>
                    <h:panelGroup id="NameBlank"/>
                    <h:outputLabel id="OldPwdLabel" value="原始密码:" for="OldPwdSecret"/>
                    <h:inputSecret id="OldPwdSecret" value="#{accountSession.account.password}"/>
                    <rich:message for="OldPwdSecret" id="ErroOldPwdMessage"/>

                    <h:outputLabel id="NewPwdLabel" value=" 新密码:" for="NewPwdSecret"/>
                    <h:inputSecret id="NewPwdSecret" value="#{authentication.user.plaintextPassword}"/>
                    <rich:message for="NewPwdSecret" id="ErrorNewPwdSecretMessage"/>

                    <h:outputLabel id="ConfirmPwdLabel" value="确认密码:" for="ConfirmPwdSecret"/>
                    <h:inputSecret id="ConfirmPwdSecret" value="#{authentication.user.password}"/>
                    <rich:message for="ConfirmPwdSecret" id="ConfirmPwdSecretMessage"/>

                    <a4j:commandButton id="SaveChangePwdButton" execute="ChangePwd" render="@from"
                                       oncomplete="if (#{facesContext.maximumSeverity==null}){#{rich:component('ChangePwd')}.hide();return false;}"/>
                </h:panelGrid>
            </h:form>
        </rich:popupPanel>
    </h:body>
</f:view>
</html>
